package com.xiaocai.myblog.mapper;

import com.xiaocai.myblog.domain.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

/**
 * @author chenhefu
 * @date 2019-09-27 22:06
 */
public interface UserDao {

    User getUserById(Integer id);

    /**
     * 用户登录
     * @param email
     * @param password
     * @return
     */
    User login(String email, String password);

    /**
     * 用户注册
     * @param user
     * @return
     */
    int register(@Param("user") User user);

    /**
     * 获取用户信息
     * @param email
     * @return
     */
    User getUserByEmail(String email);
}
